using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Configuration;

using IDAL;
using Entities;

namespace Bll
{
    public class WareHouseBll
    {
        public IList<WareHouseInfo> GetAll()
        {
            IWareHouseDAO iWarehouse = (IWareHouseDAO)AssemblyLoader.Load("WareHouseDAO");
            return iWarehouse.GetAll();
        }

        public WareHouseInfo GetByFactoryID(string factoryID)
        {
            IWareHouseDAO iWarehouse = (IWareHouseDAO)AssemblyLoader.Load("WareHouseDAO");
            return iWarehouse.GetByFactoryID(factoryID);
        }

        public bool Insert(WareHouseInfo wareHouse)
        {
            IWareHouseDAO iWarehouse = (IWareHouseDAO)AssemblyLoader.Load("WareHouseDAO");
            return iWarehouse.Insert(wareHouse);
        }

        public bool Update(WareHouseInfo wareHouse)
        {
            IWareHouseDAO iWarehouse = (IWareHouseDAO)AssemblyLoader.Load("WareHouseDAO");
            return iWarehouse.Update(wareHouse);
        }
    }
}
